#!/usr/bin/env python3
# encoding: utf-8

"""
@version: 1.0
@author: 周永波
@file: ModelViewReturn.py
@time: 2020/7/31 9:41
"""
from rest_framework.viewsets import ModelViewSet


class ModelViewReturn(ModelViewSet):
    def create(self, request, *args, **kwargs):
        return super().create(request, *args, **kwargs).data

    def update(self, request, *args, **kwargs):
        return super().update(request, *args, **kwargs).data

    def retrieve(self, request, *args, **kwargs):
        return super().retrieve(request, *args, **kwargs).data

    def list(self, request, *args, **kwargs):
        return super().list(request, *args, **kwargs).data

    def destroy(self, request, *args, **kwargs):
        return super().destroy(request, *args, **kwargs).data


